clear all
set more off
global dpath "[Userpath]\data and code"

use "$dpath/data/firm DID.dta",replace
cd "$dpath\results"

gen time = year-1997

reghdfe lwastewater treated, absorb(id_ESR citycode#year cic2#year) cluster(citycode)
estimates store reg1
reghdfe lwastewater treated treatedM llgdpC, absorb(id_ESR citycode#year cic2#year) cluster(citycode)
estimates store reg2
reghdfe lcod treated, absorb(id_ESR citycode#year cic2#year) cluster(citycode)
estimates store reg3
reghdfe lcod treated treatedM llgdpC, absorb(id_ESR citycode#year cic2#year) cluster(citycode)
estimates store reg4
esttab reg1 reg2 reg3 reg4 using TableAVII.rtf,replace b(%9.3f) se scalar(N r2_a) star(* 0.1 **  0.05  *** 0.01) keep(treated) title(Table AVII)
est clear